package com.mxt.moviedemo.dao;

import com.mxt.moviedemo.entity.Actors;
import com.mxt.moviedemo.entity.Directors;
import com.mxt.moviedemo.entity.PageRequest;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface DirectorsMapper {
    List<Directors> searchDirectorsByKeyword(PageRequest pageRequest, String keyword);
    int getTotalDirectorsByKeyword(String keyword);

    Directors getDirectorById(int did);


    // 根据分页参数查询类别列表
    List<Directors> getDirectorsByPage(PageRequest pageRequest);
    // 查询类别总数
    int getTotalDirectors();



    List<Directors> searchDirectorsByName(String dname);
    int addDirectors(Directors directors);
    boolean updateDirectors(Directors directors);
    int deleteDirectors(int did);
}